package com.epwk;

import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.core.UiSelector;

public class Elements {
	
	public static UiObject findById(String id){
		UiObject object = new UiObject(new UiSelector().resourceId(id));
		return object;
	}
	
	public static UiObject findByText(String text){
		UiObject object = new UiObject(new UiSelector().text(text));
		return object;
	}
	
	public static UiObject findByIndex(int index){
		UiObject object = new UiObject(new UiSelector().index(index));
		return object;
	}
	
	public static UiObject findByClassName(String classname,int id){
		UiObject object = new UiObject(new UiSelector().className(classname).index(id));
		return object;
	}
	
	public static UiObject findByDescription(String desc){
		UiObject object = new UiObject(new UiSelector().description(desc));
		return object;
	}
	
	public static UiObject findByPackageName(String name){
		UiObject object = new UiObject(new UiSelector().packageName(name));
		return object;
	}

}
